<div class="row">
    <div class="col-xs-12">
        <div class="box box-success">
            <div class="box-header">
                <h3 class="box-title">历史日期</h3>
            </div>
            <div class="box-body">
                <form>
                <div class="form-group">
                    <label>日期选择:</label>

                    <div class="input-group date col-xs-4">
                        <div class="input-group-addon">
                            <i class="fa fa-calendar"></i>
                        </div>
                        <input type="text" name="date" class="form-control pull-right" id="datepicker">
                        <span class="input-group-btn">
                            <button type="button" class="btn btn-success btn-flat" data-url="{{ url('admin/consume/history') }}" onclick="postfun(this)">查询</button>
                        </span>
                    </div>
                </div>
                </form>
            </div>
        </div>

    </div>
</div>

<div class="row">
    <div class="col-xs-12">
        <div class="box box-primary">
            <div class="box-header">
                <h3 class="box-title">历史课表</h3>
            </div>

            <!-- /.box-header -->
            <div class="box-body table-responsive no-padding">
                <table class="table table-hover">
                    <tr>
                        <th width="50px">ID</th>
                        <th>星期</th>
                        <th width="200px">时间</th>
                        <th>课程名称</th>
                        <th>老师</th>
                        <th>课程年龄</th>
                        <th width="360px">小朋友</th>
                        <th></th>
                    </tr>
                    @if($classes_logs != null)
                    @foreach($classes_logs as $classes_log)
                    <tr>
                        <td>{{ $classes_log->id }}</td>
                        <td>周{{ \Carbon\Carbon::parse($classes_log->class_date)->dayOfWeek }}</td>
                        <td>{{ $classes_log->class_time }}</td>
                        <td>{{ $classes_log->course_name }}</td>
                        <td>{{ $classes_log->teacher_name }}</td>
                        <td>{{ $classes_log->course_age }}岁</td>
                        <td id="child_td">{{ $classes_log->children }}</td>
                    </tr>
                    @endforeach
                    @endif
                </table>
            </div>
            <div class="box-footer clearfix">

            </div>
            <!-- /.box-body -->
        </div>

    </div>
</div>
<script>
    $(function () {
        //Date picker
        $('#datepicker').datepicker({
            autoclose: true
        })
    })
</script>